﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace olierFrm.WebFormDev.Session
{
    [Serializable]
    public class SUser
    {



        public SUser()
        {
            //if (HttpContext.Current.Session[SessionID] == null)
            //    return;
            //var su = (SessionUser)HttpContext.Current.Session[SessionID];
            //this.Operator = su.Operator;
            //this.StoreNO = su.StoreNO;
            //this.ValidatorCode = su.ValidatorCode;
        }

        public const string SessionID = "SessionUser";
        public string ValidatorCode { get; set; }
        public string Operator { get; set; }
        public string UserName { get; set; }
        public string StoreNO { get; set; }

        //public void AddToSession()
        //{
        //    HttpContext.Current.Session[SessionID] = this;
        //}


        //public static SUser Session
        //{
        //    get
        //    {
        //        if (HttpContext.Current.Session == null || HttpContext.Current.Session[SessionID] == null)
        //        {
        //            HttpContext.Current.Session[SessionID] = new SUser();
        //        }
        //        return (SUser)HttpContext.Current.Session[SessionID];
        //    }
        //    set
        //    {
        //        HttpContext.Current.Session[SessionID] = value;
        //    }
        //}


    }
}
